/**
 * 
 */
package com.goodedeeds.webapp.controller;

import net.sourceforge.stripes.action.Resolution;
import net.sourceforge.stripes.action.UrlBinding;
import net.sourceforge.stripes.validation.EmailTypeConverter;
import net.sourceforge.stripes.validation.Validate;

/**
 * @author ravi
 *
 */
@UrlBinding(ResetPasswordAction.URL)
public class ResetPasswordAction extends QuiggleAction {
	
	public static final String URL = "/reset-password.action";

    public static final String VIEW = JSP_ROOT + "/reset-password.jsp";
//    public static final String HEADER_BAR = JSP_ROOT + "/reset-password-header-bar.jsp";
    public static final String HEADER_BAR = JSP_ROOT + "/login.jsp";

	@Validate(required=true, on="sendPassword", converter=EmailTypeConverter.class)
	private String email;



    @Override
    public String getQuiggleContent() {
        return VIEW;
    }

    @Override
    public String getQuiggleHeaderInclude() {
        return HEADER_BAR;
    }

    /**
	 * @return the email
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * @param email the email to set
	 */
	public void setEmail(String email) {
		this.email = email;
	}


    private Boolean success;

    public Resolution sendPassword(){
        if(email != null){
//            success = AuthDaoFactory.getAuthenticationDao().resetPassword(email);
        }
        return showPage();
    }

    public Boolean getSuccess() {
        return success;
    }

    public String getLoginEmail(){
        return null;
    }
    public String getLoginPassword(){
        return null;
    }
}
